Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add listnames RPC command for dotNav #937

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

mxaddict
Copy link
Contributor

@mxaddict mxaddict commented Feb 14, 2022

closes #924

@navbuilder
Copy link

A new build of 763fb6f has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

@mxaddict mxaddict force-pushed the add-listnames-rpc-command branch from 763fb6f to 868977e Compare February 21, 2022 04:58
@mxaddict
Copy link
Contributor Author

@aguycalled should I just create an index for the dotNav names like I did for nftindex?

@aguycalled
Copy link
Member

@aguycalled should I just create an index for the dotNav names like I did for nftindex?

sounds good

@mxaddict
Copy link
Contributor Author

Should I maybe add the name to the namerecords index?

@aguycalled
Copy link
Member

I'd say modifying the current index would make current clients crash when they try to read it with a different structure, unless some kind of versioning is implemented. Might be better to have a different index.

@mxaddict
Copy link
Contributor Author

mxaddict commented Feb 26, 2022 via email

@navbuilder
Copy link

A new build of 4e587d3 has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

@navbuilder
Copy link

A new build of e32d689 has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

@navbuilder
Copy link

A new build of 2927669 has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

@navbuilder
Copy link

A new build of d9ba894 has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

 Conflicts:
	src/coins.cpp
	src/coins.h
	src/rpc/client.cpp
	src/txdb.cpp
	src/txdb.h
	src/wallet/rpcwallet.cpp
@navbuilder
Copy link

A new build of 455710a has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

@mxaddict mxaddict requested review from aguycalled and 0x2830 March 11, 2022 15:35
@navbuilder
Copy link

A new build of 61fa02a has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

@navbuilder
Copy link

A new build of 7644855 has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

@navbuilder
Copy link

A new build of b1f4384 has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

@chasingkirkjufell
Copy link
Contributor

chasingkirkjufell commented Mar 15, 2022

after i got this error and pressed ok after starting with -nameindex=0 and then switched to -nameindex=1
image
i got another error
image
i thought the message means it'll reindex once i press ok. do i still need to set it? i seem to recall it reindex for me for token index.

further more, after i set -reindex-chainstate=1, i still get the same errors as above

@mxaddict
Copy link
Contributor Author

after i got this error and pressed ok after starting with -nameindex=0 and then switched to -nameindex=1 image i got another error image i thought the message means it'll reindex once i press ok. do i still need to set it? i seem to recall it reindex for me for token index.

further more, after i set -reindex-chainstate=1, i still get the same errors as above

It should have rebuild the index, what does the debug.log say?

@mxaddict
Copy link
Contributor Author

@chasingkirkjufell I think I know what happened

  1. You started wallet with -nameindex=1 (Clicked ok on the error)
  2. You restarted wallet with -nameindex=0 (You got the error again since you wanted to turn it off when it was already on)

Do you think this might have been the case?

@chasingkirkjufell
Copy link
Contributor

@mxaddict once i set index to true, i cannot start the wallet no matter what.

2022-03-16 01:13:58 InitBlockIndex: nft index disabled
2022-03-16 01:13:58 InitBlockIndex: name index enabled
2022-03-16 01:13:58 InitBlockIndex: address index disabled
2022-03-16 01:13:58 InitBlockIndex: timestamp index disabled
2022-03-16 01:13:58 InitBlockIndex: spent index disabled
2022-03-16 01:13:58 Initializing databases...
2022-03-16 01:13:59 GUI: initializeResult : Initialization result:  0
2022-03-16 01:13:59 GUI: requestShutdown : Requesting shutdown
2022-03-16 01:13:59 GUI: shutdown : Running Shutdown in thread
2022-03-16 01:13:59 Interrupting HTTP server
2022-03-16 01:13:59 Interrupting HTTP RPC server
2022-03-16 01:13:59 Interrupting RPC
2022-03-16 01:13:59 scheduler thread interrupt
2022-03-16 01:13:59 PrepareShutdown: In progress...
2022-03-16 01:13:59 Stopping HTTP RPC server
2022-03-16 01:13:59 Stopping RPC
2022-03-16 01:13:59 Stopping HTTP server
2022-03-16 01:13:59 Stopped HTTP server
2022-03-16 01:13:59 StopNode()
2022-03-16 01:13:59 Committing 0 changed transactions (out of 0) to coin database...
2022-03-16 01:13:59 Shutdown: done
2022-03-16 01:13:59 GUI: shutdown : Shutdown finished
2022-03-16 01:13:59 GUI: shutdownResult : Shutdown result:  1
2022-03-16 01:13:59 GUI: ~NavcoinApplication : Stopping thread
2022-03-16 01:13:59 GUI: ~NavcoinApplication : Stopped thread```

@mxaddict
Copy link
Contributor Author

mxaddict commented Mar 16, 2022 via email

@chasingkirkjufell
Copy link
Contributor

yep

@navbuilder
Copy link

A new build of 1cf3fcf has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

@chasingkirkjufell
Copy link
Contributor

@mxaddict still the same error
i'm running navcoi-qt with -nameindex=0 fresh devnet folder. no issues so far
switch to -nameindex=1, the window popped up saying needing to reindex chainstate, do i want to do it now? clicked okay, got the error saying need to do reindex again then wallet shuts down (the wallet should be doing reindexing now since i clicked okay and this is the behavior for other index i believe)
now keep -nameindex=1 and add -reindex-chainstate, open wallet, same error and wallet shuts down after clicking the oks.

@mxaddict
Copy link
Contributor Author

I see, will test it out

@navbuilder
Copy link

A new build of 33fb611 has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

@navbuilder
Copy link

A new build of 14dc474 has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

@navbuilder
Copy link

A new build of 6cd2b4d has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

@navbuilder
Copy link

A new build of 5e7370a has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict:add-listnames-rpc-command

@navbuilder
Copy link

A new build of 5e7370a has completed succesfully!
Binaries available at https://build.nav.community/binaries/mxaddict/navcoin-core:add-listnames-rpc-command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add listnames rpc method
4 participants